package hy.service.impl;

import bean.UserAddress;
import com.alibaba.dubbo.config.annotation.Reference;
import hy.service.OrderService;
import org.springframework.stereotype.Service;
import service.UserService;

@Service
public class OrderServiceImpl implements OrderService {
    @Reference(timeout=2000,retries=1)
//    @Reference(stub = "hy.service.impl.US_stub",url = "192.168.1.87:20880")
//    @Reference(loadbalance = "roundrobin")
    UserService service;
    @Override
    public UserAddress initOrder(String id) {
        UserAddress addr=service.getUserAddress(id);
        System.out.println("id为"+id+"的用户地址为："+addr);
        return addr;
    }
}